<template>
  <div class="operateMain">
    <basic-container>
      <div class="wrap" v-loading="loading" element-loading-text="数据加载中...">
				<dataList
					placeholder="请输入物业或工程名称查询"
					:pageInfo="pager"
					:listData="tableData"
					:selectData="selectDataArr"
					searchName="queryString"
					:menuList="['add','delete']"
					@menu-click="handleMenuClick"
				>
					<el-table :data="tableData" align="center" ref="multipleTable" @selection-change="$event => (selectDataArr = $event)">
						<el-table-column type="selection" align="center" width="55" />
						<el-table-column label="物业名称" header-align="center" width="170" prop="propertyName" />
						<el-table-column label="工程名称" header-align="center" prop="engineeringName" />
						<el-table-column label="施工单位" align="center" width="150" prop="unitName" />
						<el-table-column label="单位类型" align="center" width="120" prop="unitType">
							<template slot-scope="scope">{{getCompanyName(scope.row.unitType)}}</template>
						</el-table-column>
						<el-table-column label="验收日期" align="center" :formatter="dateFormatter" width="160" prop="deliverableTm" />
						<el-table-column label="验收评语" align="center" prop="performanceEvaluation" />
						<el-table-column label="备注" header-align="center" width="160" prop="remarks" />
						<el-table-column label="操作" align="center" width="140" class="operaColumn" header-align="center">
							<template slot-scope="scope">
								<el-button type="text" :style="{'--color':'#666666'}" size="mini" @click="handleBtnClick('preview',scope.row)">查看</el-button>
								<el-button type="text" :style="{'--color':'#409EFF'}" size="mini" @click="handleBtnClick('edit',scope.row)">编辑</el-button>
								<el-button type="text" :style="{'--color':'#E6A23C'}" size="mini" @click="handleBtnClick('delete',scope.row)">删除</el-button>
							</template>
						</el-table-column>
					</el-table>
				</dataList>
      </div>
      <!-- 新增|编辑|查看 单位 -->
      <departmentDialog ref="editDialog" />
      <!-- 上传组件功能细节待确定 -->
    </basic-container>
  </div>
</template>

<script src='./index.js'></script>

<style lang="scss" scoped>
@import "src/views/wy-operate/css/operate.scss";
.operateMain {
  /deep/ .top-buttons {
    float: right;
    width: 50%;
  }
  /deep/ .v-search {
    width: 50%;
    justify-content: flex-start;
  }
  /deep/ .operaColumn .el-button {
    color: var(--color);
  }
}
</style>
